# 作用：字符串
# 作者：霜white
# 时间：2016-12-26

tup1 = ('Google', 'Baidu', 1988, 2008)
tup2 = (1, 2, 3, 4, 5)
tup3 = "a", "b", "c", "d"

# 创建空元组
tup0 = ()

# 创建只包含一个元素的元组
tup4 = (50, )


# 访问元组
print("tup1[0]: ", tup1[0])
print("tup2[1:5]:", tup2[1:5])


# 修改元组
tup11 = (12, 34.56)
tup22 = ('abc', 'xyz')

tup33 = tup1 + tup2
print(tup33)


# 删除元组
tup_01 = ('baidu', 'Google', 1988, 2016)
print(tup_01)
del tup_01
print("删除后的元组 tup_01: ")
# print(tup_01)


# 元组截取
tup02 = ('Google', 'Baidu', 1988, 2016)
print(tup02[2])
print(tup02[1:])